<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <body>

        <ui:composition template="./Test.xhtml">



            <ui:define name="content">


                <fieldset style="height: 300px">
                    <legend><b>Update Contact </b></legend>


                    <table width="457" height="190" border="0">
                        <tr>

                            <td><b>First Name *</b></td>
                            <td><p:inputText value="#{contactBean.con.firstName}" id="txtname" required="true" requiredMessage="First Name is not null"/></td>
                            <td><p:message for="txtname"/></td>
                        </tr>
                        <tr>

                            <td><b>Your Email *</b></td>
                            <td><p:inputText value="#{contactBean.con.yourEmail}" id="txtmail" required="true" requiredMessage="Email is not null">
                                    <!--<f:validator validatorId="Validator.StringValidator"/>--></p:inputText>
                            </td>
                            <td><p:message for="txtmail"/></td>
                        </tr>
                        <tr>
                            <td><b>Message * </b></td>
                            <td><p:inputText value="#{contactBean.con.message}" id="txtmess" required="true" requiredMessage="Message is not null">
                                    <!--<f:validator validatorId="Validator.StringValidator"/>--></p:inputText>
                            </td>
                            <td><p:message for="txtmess"/></td>
                        </tr>
                         <tr>
                            <td><b>Date * </b></td>
                            <td><p:inputText value="#{contactBean.con.ctDate}" id="txtdate" required="true" requiredMessage="Date is not null">
                                    <f:convertDateTime pattern="MM/dd/yyyy" timeZone="VST"/>
                                </p:inputText>
                            </td>
                            <td><p:message for="txtdate"/></td>
                        </tr>
                         <tr>
                            <td><b>Status * </b></td>
                            <td><p:inputText value="#{contactBean.con.status}" id="txtstatus" required="true" requiredMessage="Status is not null">
                                    <f:validator validatorId="Validator.StringValidator"/></p:inputText>
                            </td>
                            <td><p:message for="txtstatus"/></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <h:commandButton  action="Contact" actionListener="#{contactBean.updateContact}" type="image" image="../resources/images/forms/form_submit.gif"/>

                                <h:commandButton  action="Contact" type="image" image="../resources/images/forms/form_reset.gif"/>
                            </td>
                            <td></td>
                        </tr>
                    </table>

                </fieldset>

            </ui:define>


        </ui:composition>

    </body>
</html>
